package demoMod.stsconsole.powers;

import demoMod.stsconsole.cards.status.Wound;
import demoMod.stsconsole.characters.AbstractPlayer;
import demoMod.stsconsole.core.AbstractCreature;
import demoMod.stsconsole.helpers.DamageInfo;
import demoMod.stsconsole.interfaces.InflictSubscriber;

public class PainfulStabPower extends AbstractPower implements InflictSubscriber {
    public static final String ID = "PainfulStabPower";

    public PainfulStabPower(AbstractCreature owner) {
        super(ID, owner, new int[0]);
    }

    @Override
    public void onInflictDamage(DamageInfo info, AbstractCreature target) {
        if (info.source == this.owner && target instanceof AbstractPlayer) {
            ((AbstractPlayer) target).makeTempCardsInDiscardPile(new Wound(), 1);
        }
    }

    @Override
    public String getUpdatedDescriptions() {
        return this.description;
    }
}
